package com.example.demo.crc16;

public class BytesTest {

    public static void main(String[] args) {
        byte[] bytes = new byte[]{0b10, -0b1111111};
        for (byte aByte : bytes) {
            System.out.println(aByte);
        }
        int a = bytes[1];
        System.out.println(a);
        System.out.println(Byte.parseByte("-0111111", 2));
        a = 0xffffffff & 0xff;
        System.out.println(a);
        byte b = (byte)a;
        System.out.println((byte)(0xffffffff & 0x80));

        System.out.println((byte)(bytes[1] >> 1) & (byte)0x7F);
    }
}
